<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    /*new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve('ok');
        }, 1000)
    }).then(data => {
        console.log(data);
        throw '自我跑出哦';
        return Promise.reject('错误咯')

    }).then(datas => {
        console.log(datas);
        return Promise.resolve('没有new哦')
    }).then(res => {
        console.log(res);

        return '连用都不用了';
    }).then(res => {
        console.log(res);

    }).catch(err=>{
        console.log(err + '66');
    })*/


    Promise.all([
        new Promise(res => {
            setTimeout(()=>{
                console.log('我是1号');
                res('我是1号');
            },1500)
        }),
        new Promise(res => {
            setTimeout(()=>{
                console.log('我是2号');
                res('我是2号');
            },1000)
        })
    ]).then(arr => {
        console.log(arr);
    })


</script>
</body>
</html>